package cn.hwadee.muying.entity;

import cn.hwadee.muying.commons.base.BaseModel;
import com.baomidou.mybatisplus.annotations.TableField;

import java.util.Date;

/**
 * <p>
 * 用户相关信息
 * </p>
 *
 * @author Tony
 * @since 2018-04-17
 */
public class User extends BaseModel {

    private static final long serialVersionUID = 1L;
    /**
     * 账号
     */
    private String account;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码(md5加密)
     */
    private String password;
    /**
     * 类型名称
     */
    @TableField(exist = false)
    private String type;
    /**
     * 角色id
     */
    private Long rid;
    /**
     * 机构id
     */
    @TableField("org_id")
    private Long orgId;

    private String telephone;

    private String address;

    private Date birthday;

    private String email;

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getRid() {
        return rid;
    }

    public void setRid(Long rid) {
        this.rid = rid;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public static final String OPENID = "open_id";

    public static final String ORGID = "org_id";

    @Override
    public String toString() {
        return "User{" +
                "account='" + account + '\'' +
                ", id=" + id +
                ", username='" + username + '\'' +
                ", createDate=" + createDate +
                ", password='" + password + '\'' +
                ", updateDate=" + updateDate +
                ", type='" + type + '\'' +
                ", rid=" + rid +
                ", deleteDate=" + deleteDate +
                ", orgId=" + orgId +
                ", telephone='" + telephone + '\'' +
                ", valid=" + valid +
                ", address='" + address + '\'' +
                ", birthday=" + birthday +
                ", email='" + email + '\'' +
                '}';
    }
}
